package com.logic.saas.action;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.logic.saas.pojo.User;



public class LogoutAction  extends BaseAction{

    private static final long serialVersionUID = 1101800821795228322L;
    private Logger logger = Logger.getLogger(LogoutAction.class.getName());
    
    @Override
	@Action(results = {
	@Result(name = "success", location = "/login.action", type = "redirect") })
    public String execute() throws Exception {
        User user = this.getSessionUser();
        logger.info("Logout:"+user.getShortName());
        
        clearSession();
        
        return SUCCESS;
    }

}